xenstored: Only dom0 can do XS_DEBUG in non-test environments.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Sat, 21 Apr 2007 10:37:34 +0000 (11:37 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Sat, 21 Apr 2007 10:37:34 +0000 (11:37 +0100)
Signed-off-by: Keir Fraser <keir@xensource.com>
tools/xenstore/xenstored_core.c

index 461395832a956d521266e284be45743c23959b0e..d1288842217ac0a03c80ed0f49b027bd1798291f 100644 (file)
@@ -1163,6 +1163,13 @@ static void do_debug(struct connection *conn, struct buffered_data *in)
 {
        int num;
 
+#ifndef TESTING
+       if (conn->id != 0) {
+               send_error(conn, EACCES);
+               return;
+       }
+#endif
+
        num = xs_count_strings(in->buffer, in->used);
 
        if (streq(in->buffer, "print")) {